﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Controls="clr-namespace:Helper.Controls;assembly=Helper" x:Class="Starehe.Views.NewEvent" 
             mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="984"
             Background="White">
    <Grid>
        <TextBlock HorizontalAlignment="Left" Margin="20,20,0,0" Style="{DynamicResource Title}"  Text="New Event" 
			VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="30,130,0,0" Text="Starts" VerticalAlignment="Top"
                   Style="{DynamicResource ContentTextSemiBold}"/>
        <TextBlock HorizontalAlignment="Left" Margin="50,170,0,0" Text="Date" VerticalAlignment="Top"/>
        <DatePicker HorizontalAlignment="Left" Margin="90,170,0,0" VerticalAlignment="Top" Width="180" SelectedDateFormat="Long"
                    DataContext="{Binding NewEvent}"
                    SelectedDate="{Binding StartDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBlock HorizontalAlignment="Left" Margin="50,225,0,0" Text="Time" VerticalAlignment="Top"/>
        <Controls:TimePicker HorizontalAlignment="Left" Margin="90,225,0,0" VerticalAlignment="Top"
                    DataContext="{Binding NewEvent}"
                    SelectedTime="{Binding StartTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBlock HorizontalAlignment="Left" Margin="30,280,0,0" Text="Ends" VerticalAlignment="Top"
                   Style="{DynamicResource ContentTextSemiBold}" />
        <TextBlock HorizontalAlignment="Left" Margin="50,320,0,0" Text="Date" VerticalAlignment="Top"/>
        <DatePicker HorizontalAlignment="Left" Margin="90,320,0,0" VerticalAlignment="Top" Width="180" SelectedDateFormat="Long"
                    DataContext="{Binding NewEvent}"
                    SelectedDate="{Binding EndDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBlock HorizontalAlignment="Left" Margin="50,375,0,0" Text="Time" VerticalAlignment="Top"/>
        <Controls:TimePicker HorizontalAlignment="Left" Margin="90,375,0,0" VerticalAlignment="Top"
                    DataContext="{Binding NewEvent}"
                    SelectedTime="{Binding EndTime, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
        <TextBlock HorizontalAlignment="Left" Margin="30,439,0,0" Text="Location" VerticalAlignment="Top"
                   Style="{DynamicResource ContentTextSemiBold}"/>
        <TextBox HorizontalAlignment="Left" Margin="90,475,0,0"  VerticalAlignment="Top" Width="220"
                 DataContext="{Binding NewEvent}"
                 Text="{Binding Location, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
        <TextBox Height="50" Margin="350,80,50,0" VerticalAlignment="Top" FontSize="28" FontFamily="Segoe UI Light"
                 BorderBrush="Transparent" BorderThickness="0" 
                 Style="{DynamicResource AddSubjectTextBox}"
                 DataContext="{Binding NewEvent}"
                 Text="{Binding Subject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <Border BorderThickness="1" BorderBrush="Silver" VerticalAlignment="Top" Margin="350,131,50,0"/>
        <TextBox Margin="350,138,50,60" BorderBrush="Transparent" BorderThickness="0"
                 Style="{DynamicResource AddTextTextBox}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"
                 DataContext="{Binding NewEvent}"
                 Text="{Binding Message, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
        <Button Content="Save" Margin="0,0,20,20" HorizontalAlignment="Right" Width="120" Height="32" VerticalAlignment="Bottom"
                Command="{Binding SaveCommand}"/>
        <TextBlock HorizontalAlignment="Left" Margin="30,80,0,0" Text="Name" VerticalAlignment="Top" Style="{DynamicResource ContentTextSemiBold}"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="90,76,0,0" VerticalAlignment="Top" Width="180"
                 DataContext="{Binding NewEvent}"
                 Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <Button Content="Save &amp; Share" HorizontalAlignment="Right" Margin="0,0,150,20" VerticalAlignment="Bottom" Width="150"
                Command="{Binding SaveAndShareCommand}"/>

    </Grid>
</UserControl>
